#ifndef TRANSACTIONMODEL_H
#define TRANSACTIONMODEL_H

#include <QList>
#include <QDateTime>

#include "core/basemodel.h"
#include "core/customermodel.h"
#include "core/stockmodel.h"

class TransactionModel : public BaseModel
{
public:
    TransactionModel();

    QList<StockModel *> getStocks();
    void setStocks(QList<StockModel *> stocks);

    QDateTime getSaleTime();
    void setSaleTime(QDateTime date);

    CustomerModel *getCustomer();
    void setCustomer(CustomerModel *customer);

    QDateTime getLastModificationTime();
    void updateLastModificationTime();
    void setLastModificationTime(QDateTime datetime);

    QString getDeliveryStatus();
    void setDeliveryStatus(QString deliveryStatus);

    bool isPaid();
    void setPaid(bool paid);

    bool isValid();
    void setValid(bool valid);

private:
    QList<StockModel *> stocks;
    QDateTime saleTime;
    CustomerModel *customer;
    QDateTime lastModified;
    QString deliveryStatus;
    bool paid;
    bool valid;
};

#endif // TRANSACTIONMODEL_H
